// Copyright 2022 jeff.li. and/or its affiliates.

#pragma once

#include <tbir/runtime/container/file_ref.h>
#include <tbir/runtime/container/unicode.h>
#include <tbir/runtime/runtime_value.h>

namespace tbir::runtime {

    RTValue json_load(const File &fp);

    RTValue json_loads(string_view s);

    // TODO(jeff): Need a file class that supports write operations
    // RTValue json_dump(const RTValue& obj, const File& fp, int indent = -1, bool ensure_ascii = true);

    Unicode json_dumps(const Any &obj, int indent = -1, bool ensure_ascii = true);

}  // namespace tbir::runtime
